﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/ezdesk_app_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="pageTitle" -->
    <title>易得桌面</title>
    <!-- InstanceEndEditable -->
    <link href="Content/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
    <link href="Content/ui.textbox.css" type="text/css" rel="stylesheet" media="all" />
    <link href="Content/freecontent.css" rel="stylesheet" type="text/css" />
    <link href="Content/wdatepicker.css" rel="stylesheet" type="text/css" />
    <link href="Content/ajaxbusy.css" rel="stylesheet" type="text/css" />
    <link href="Content/Site.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/ezdesk_mockdata.js" type="text/javascript"></script>
    <script src="Scripts/jquery.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui.custom.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="Scripts/ui.textbox.js" type="text/javascript"></script>
    <script src="Scripts/pinyin.js" type="text/javascript"></script>
    <script src="Scripts/ezdesk-jquery-ui.js" type="text/javascript"></script>
    <script src="Scripts/ezdesk_common.js" type="text/javascript"></script>
</head>
<!-- InstanceBeginEditable name="pageStyles" -->
<style type="text/css">
    li
    {
        display: block;
    }
</style>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="pageScripts" -->
<script type="text/javascript">
    //************* URL常量
    var URL_MODITY_ATTENDANCE_EVALUATION = "/Attendance/ModifyAttendanceEvaluation";
    //************* 全局变量
    var g_Var = {
        "time": null,
        "targetUserId": null,
        "dataStorage": null
    };
    //************* 常量定义
    var StaticResource = {
        "WeekendInfo": {
            "false": "非周末",
            "true": "周末"
        },
        "IsNeedToWork": {
            "false": "休息",
            "true": "正常上班"
        },
        "YesOrNoBing": [
            {
                "text": "是",
                "value": true
            },
            {
                "text": "否",
                "value": false
            }
        ],
        "ApplicationState": {
            "Applying": "正在处理",
            "Done": "已处理"
        },
        "ItemName": {
            "LateMiniutes": "迟到",
            "EarlyMiniutes": "早退",
            "IsAbsense": "旷工",
            "IsExtraWork": "加班",
            "ManHours": "获得工时"
        },
        "timeTarget": {
            "minute": "分钟",
            "hour": "小时"
        },
        "YesOrNoTarget": {
            "false": "否",
            "true": "是",
            "False": "否",
            "True": "是"
        },


    };


    //************* Accessor访问器
    var EzAccessor = {};
    function CreateAccessor() {
        if (ezmock.IS_MOCKED) {
            EzAccessor = CreateMockEzAccessor();

        } else {
            EzAccessor = CreateRealEzAccessor();
        }
    }


    function CreateMockEzAccessor() {
        //模拟实现服务器交互方法
        var mock_application = 
        {
            "ApplyUserId": "1111",
            "ApplyUser": {"Name": "MR.春"},
            "ApplyOn": "1243999999",
            "ApplyText": "忘了打卡",
            "State": "Applying"
        };


        var mock_daInfo = {
            "Date": "1243180800",
            "IsNeedToWork": true,
            "HolidayInfo": {
                "Name": "国庆节"
            },
            "ExtraShiftInfo": {
                "Name": "年假"
            },
            "IsWeekEnd": false
        };

        var mock_targetUser = {
            "Id": "0c9d7c0c-04a5-4ae2-97a1-d7bbc38f5c66",
            "Name": "MR.春", "UserName": "yuxin",
            "Dept": {
                "Id": "bd3474a8-6c2d-43ef-bf42-b06827a216f6",
                "DeptName": "软件工程部",
                "GroupId": "9ad96dac-88d8-4315-bfdb-9931c8f3cb7c"
            }
        };


        //todo:
        var mock_dayAttendanceDetail = { "TargetUser": { "Id": "19f1c421-280f-4935-9980-e469175461c2", "Name": "龚伟", "UserName": "gw", "Dept": { "Id": "5d83f6f5-a149-4112-a07a-14ad2d51cacb", "DeptName": "施工图部", "GroupId": "7c5fc3e7-cd9a-4dc6-a901-79cc42e7f310"} }, "AttendanceInfoList": [{ "Id": "00000000-0000-0000-0000-000000000000", "UserId": "00000000-0000-0000-0000-000000000000", "Date": "1289359900", "AttendanceType": "onDuty", "ActionTime": "1289372900", "Explanation": "去银行", "IsAbnormalAttendance": false }, { "Id": "00000000-0000-0000-0000-000000000000", "UserId": "00000000-0000-0000-0000-000000000000", "Date": "1289359900", "AttendanceType": "onDuty", "ActionTime": "1289359900", "Explanation": "", "IsAbnormalAttendance": false }, { "Id": "00000000-0000-0000-0000-000000000000", "UserId": "00000000-0000-0000-0000-000000000000", "Date": "1289359900", "AttendanceType": "offDuty", "ActionTime": "1289380900", "Explanation": "", "IsAbnormalAttendance": true}], "AttendanceEvaluation": { "UserId": "00000000-0000-0000-0000-000000000000", "Id": "00000000-0000-0000-0000-000000000000", "Date": "\/Date(-62135596800000)\/", "IsNeedToWork": true, "IsLate": true, "LateMiniutes": 30, "IsLeaveEarly": true, "EarlyMiniutes": 20, "IsAbsense": false, "IsExtraWork": true, "ManHours": 75 }, "LeaveInfo": { "IsWholeDay": true, "Date": "1289359500", "Leaves": [{ "LeaveName": "事假", "LeaveId": "00000000-0000-0000-0000-000000000000", "Day": "\/Date(-62135596800000)\/", "StartTime": "1289354400", "EndTime": "1289359900", "IsForWork": true }, { "LeaveName": "病假", "LeaveId": "00000000-0000-0000-0000-000000000000", "Day": "\/Date(-62135596800000)\/", "StartTime": "1289341900", "EndTime": "1289369900", "IsForWork": false}]} };
        
        var mock_currentDate = "1243181800";

        var mock_EvaluationModifyHistory = [
            {
                "ModifyOn": "1243999999",
                "Operator": {
                    "Id": "19f1c421-280f-4935-9980-e469175461c4",
                    "Name": "卢春叶"
                },
                "AttendanceEvaluationChangeList": [
			        {
			            "ItemName": "LateMiniutes",
			            "OldValue": "30",
			            "NewValue": "20"
			        },
                    {
                        "ItemName": "IsExtraWork",
                        "OldValue": false,
                        "NewValue": true
                    }
                ]
            },
             {
                 "ModifyOn": "1243956789",
                 "Operator": {
                     "Id": "19f1c421-280f-4935-9980-e469175461c4",
                     "Name": "严兰兰"
                 },
                 "AttendanceEvaluationChangeList": [
			        {
			            "ItemName": "IsAbsense",
			            "OldValue": false,
			            "NewValue": true
			        },
                    {
                        "ItemName": "ManHours",
                        "OldValue": "80",
                        "NewValue": "75 "
                    }
                ]
             }

        ];


        var mockEzAccessor = {
            "getModifyAttendanceApplication": function () {
                return mock_application;
            },
            "getDayInfo": function () {
                return mock_daInfo;
            },

            "getDayAttendanceDetail": function () {
                return mock_dayAttendanceDetail;
            },

            "getTargetUser": function () {

                return mock_targetUser;
            },
            "getCurrentDate": function () {

                return mock_currentDate;
            },

            "geEvaluationModifyHistory": function () {
                return mock_EvaluationModifyHistory;
            },


            "doModifyAttendanceEvaluation": function (modifyUserId, date, lateMiniutes, leaveEarlyMiniutes, isAbsense, isExtraWork, manHours) {
                var stateInfo = { 'State': 'Success', 'Info': '修改成功!', 'Date': null };
                $.displayStateInfo(stateInfo);
            }

        };

        return mockEzAccessor;
    }

    function CreateRealEzAccessor() {
        //实现服务器交互方法
        var realEzAccessor = {
            "getModifyAttendanceApplication": function () {
//                return <%= ViewData["ModifyAttendanceApplication"] %>;
            },

            "getDayInfo": function () {
//                return <%= ViewData["DayInfo"] %>;
            },
            "getTargetUser": function () {
//                return <%=ViewData["TargetUser"]%>

            },
            "getCurrentDate": function () {

//                   return <%=ViewData["CurrentDate"]%>;
            },
            "getDayAttendanceDetail": function () {
//                return <%= ViewData["DayAttendanceDetail"] %>;
            },

            "geEvaluationModifyHistory": function () {
//                return <%= ViewData["EvaluationModifyHistory"] %>;
            },


            "doModifyAttendanceEvaluation": function (targetUserId, date, lateMiniutes, leaveEarlyMiniutes, isAbsense, isExtraWork, manHours) {
                //HttpPost
                $(document).ajaxBusy('begin');
                $.post(
                    URL_MODITY_ATTENDANCE_EVALUATION,
                    {
                        'targetUserId': targetUserId,
                        'date': date,
                        'lateMiniutes': lateMiniutes,
                        'leaveEarlyMiniutes': leaveEarlyMiniutes,
                        'isAbsense': isAbsense,
                        'isExtraWork': isExtraWork,
                        'manHours': manHours
                    },
                    function (e) {
                        $(document).ajaxBusy('end');

                        $.displayStateInfo(e);

                        pageReload();
                    }
                );
            }
        };

        return realEzAccessor;
    }



    function pageReload(){
        window.location.reload();
    
    }

    //存储考勤数据
    function getStoreData() {
        var dataStorage = [];
        var lateMiniutes = $('#cmbBeLate a').html();
        var leaveEarlyMiniutes = $('#cmbLeaveEarly a').html();
        var manHours = $('#cmbManHours a').html();
        var isAbsense = $('#selAbsent').val();
        var isExtraWork = $('#selExtraWork').val();

        dataStorage.push(lateMiniutes,
                         leaveEarlyMiniutes,
                         manHours,
                         isAbsense,
                         isExtraWork);

        return dataStorage;
    }



    function recoverData() {
        var lateMiniutes = g_Var.dataStorage[0];
        var leaveEarlyMiniutes = g_Var.dataStorage[1];
        var manHours = g_Var.dataStorage[2];
        var isAbsense = g_Var.dataStorage[3];
        var isExtraWork = g_Var.dataStorage[4];

        $('#cmbBeLate a').html(lateMiniutes);
        $('#cmbLeaveEarly a').html(leaveEarlyMiniutes);
        $('#cmbManHours a').html(manHours);
        $('#selAbsent').val(isAbsense);
        $('#selExtraWork').val(isExtraWork);

    }



    function controlModifyButton() {
        var currentData = getStoreData();
        var isChanged = isAttendanceDataCanged(currentData);
        //如果有修改 提交修改
        if (isChanged) {
            $('.pnlModifySubmit').show();
            // 给formBox加上边框
            $('#pnlModify').css({
                'border': 'solid 1px red'
                }); 
        }
        else {
            $('.pnlModifySubmit').hide();    
             // 给formBox去掉边框
            $('#pnlModify').css({
                'border': 'none'
                });       
        }

    }


    ///todo..
    //将参数抽成数组
    function domFunction(dom) {

        var root = $(dom);
        var alinkDom = $('.alink', root);
        var editDom = $('.cmbEdit', root);
        var textDom = $('.text', editDom);
        var submitDom = $('.btnSubmit', editDom);
        var cancelDom = $('.btnCancel', editDom);

        alinkDom.click(function () {
            alinkDom.hide();
            editDom.show();

            var alinkText = $('a', alinkDom).html();
            textDom.val(alinkText);
            textDom.select();

            // 给formBox加个边框
            $('#pnlModify').css({
                'border': '1px solid red'
                });

        });

        cancelDom.click(function () {
            alinkDom.show();
            editDom.hide();
            textDom.clearFields();
            //判断是否有修改控制button的显示
            controlModifyButton();
        });


        submitDom.click(function () {
            alinkDom.show();
            editDom.hide();

            var editedText = textDom.val();
            $('a', alinkDom).html(editedText);
            //判断是否有修改控制button的显示
            controlModifyButton();

        });

    }


    //上下班打卡考勤记录
    function bindCheckAttendanceDetail(attendanceDetail) {
        var attendanceInfoList = attendanceDetail.AttendanceInfoList;
        for (var key in attendanceInfoList) {
            var actionTime = Date.fromEpoch(attendanceInfoList[key].ActionTime).toFullTimeFormat();
            var isAbnormal = attendanceInfoList[key].IsAbnormalAttendance ? "*" : "";
            var attendanceDom = '<p>{isAbnormal}{actionTime}</p>';
            attendanceDom = attendanceDom.replace("{actionTime}", actionTime)
                                         .replace("{isAbnormal}", isAbnormal);
            //上班
            if (attendanceInfoList[key].AttendanceType == "onDuty") {
                $('#actionTimeOnDuty').append(attendanceDom);
            }
            //下班
            else {
                $('#actionTimeOffDuty').append(attendanceDom);
            }

        }

    }


    //假期信息
    function bindLeaveInfoDetail(attendanceDetail) {
        var leaveInfo = attendanceDetail.LeaveInfo.Leaves;
        for (var key in leaveInfo) {
            var leaveName = leaveInfo[key].LeaveName;
            var startTime = Date.fromEpoch(leaveInfo[key].StartTime);
            var endTime = Date.fromEpoch(leaveInfo[key].EndTime);
            var startTimeFormat = startTime.toFullTimeFormat();
            var endTimeFormat = endTime.toFullTimeFormat();
            var leaveTime = startTimeFormat + " 至 " + endTimeFormat;

            var leaveInfoDom = '<p>{leaveName} {leaveTime}</p>';

            leaveInfoDom = leaveInfoDom.replace("{leaveName}", leaveName)
                                       .replace("{leaveTime}", leaveTime);

            $('#cmbLeaveInfo').append(leaveInfoDom);

        }
    }



    //考勤评估信息
    function bindAttendanceEvaluationDetail(attendanceDetail) {
        var attendanceEvaluation = attendanceDetail.AttendanceEvaluation;
        var lateMiniute = attendanceEvaluation.LateMiniutes;
        var earlyMiniutes = attendanceEvaluation.EarlyMiniutes;
        var isAbsense = attendanceEvaluation.IsAbsense;
        var isExtraWork = attendanceEvaluation.IsExtraWork;
        var manHours = (attendanceEvaluation.Manhours) / 10.00;

        $('#cmbBeLate a').html(lateMiniute);
        $('#cmbLeaveEarly a').html(earlyMiniutes);
        $('#selAbsent').attr("value",isAbsense); 
        $('#selExtraWork ').attr("value",isExtraWork);
        $('#cmbManHours a').html(manHours);
    }




    function bindAttendanceDetail(attendanceDetail) {
        bindCheckAttendanceDetail(attendanceDetail);
        bindLeaveInfoDetail(attendanceDetail);
        bindAttendanceEvaluationDetail(attendanceDetail);
    }





    function editEvaluationItemValue(itemName, value) {
        var editedValue = value + StaticResource.timeTarget.minute;
        switch (itemName) {
            case StaticResource.ItemName.ManHours: editedValue = (value / 10) + StaticResource.timeTarget.hour;
                break;
            case StaticResource.ItemName.IsExtraWork: editedValue = StaticResource.YesOrNoTarget[value];
                break;
            case StaticResource.ItemName.IsAbsense: editedValue = StaticResource.YesOrNoTarget[value];
                break;

        }

        return editedValue;

    }




    //修改记录
    function showEvaluationModifyHistory(evaluationModifyHistory) {
        var evaluationChange = "";
        for (var key in evaluationModifyHistory) {
            var modifyOn = Date.fromEpoch(evaluationModifyHistory[key].ModifyOn);
            var modifyOnFormat = modifyOn.toChineseDateFormat() + " " + modifyOn.toFullTimeFormat();
            var operatorName = evaluationModifyHistory[key].Operator.Name;
            //修改人和修改时间
            var modifyTittle = '<p>{operatorName} 在 {modifyOnFormat} 修改:</p>';
            modifyTittle = modifyTittle.replace("{operatorName}", operatorName)
                                       .replace("{modifyOnFormat}", modifyOnFormat);

            //修改内容
            var modifyList = '';
            var modifyInfo = '';
            var attendanceEvaluationChangeList = evaluationModifyHistory[key].AttendanceEvaluationChangeList;
            for (var target in attendanceEvaluationChangeList) {
                var itemName = StaticResource.ItemName[attendanceEvaluationChangeList[target].ItemName];
                var oldValue = attendanceEvaluationChangeList[target].OldValue;
                var newValue = attendanceEvaluationChangeList[target].NewValue;

                //时间单位是分钟还是小时
                //加班和旷工项  对true 和 false的处理
                oldValue = editEvaluationItemValue(itemName, oldValue);
                newValue = editEvaluationItemValue(itemName, newValue);

                modifyInfo = modifyInfo + '<p>将 {itemName} {oldValue} 修改为 {newValue}</p>';
                modifyInfo = modifyInfo.replace("{itemName}", itemName)
                                      .replace("{oldValue}", oldValue)
                                      .replace("{newValue}", newValue);

            }
            evaluationChange = evaluationChange + modifyTittle + modifyInfo + "<br>";

        }

        $("#cmbEvaluationModifyHistory").append(evaluationChange);


    }




    function showApplicationList(application) {
        if(application) {
            var applyUserName = application.ApplyUser.Name;
            var applyOn =  Date.fromEpoch(application.ApplyOn);
            var applyOnFormat = applyOn.toChineseDateFormat() + " " + applyOn.toFullTimeFormat();
            var applyText = application.ApplyText;
            var applyState = StaticResource.ApplicationState[application.State];

            var applyInfoDom = ' <p>修改申请：<span>{applyUserName} 于 {applyOn}申请修改</span></p><p> 修改原因： <span >{applyText}</span></p><p><span >({applyState})</span></p>';
            applyInfoDom = applyInfoDom.replace("{applyUserName}", applyUserName)
                                   .replace("{applyOn}", applyOnFormat)
                                   .replace("{applyText}", applyText)
                                   .replace("{applyState}", applyState);

            $('#cmbApplyInfo').append(applyInfoDom);
        }

    }





    function showDayInfo(dayInfo) {
        var isWeekEnd = StaticResource.WeekendInfo[dayInfo.IsWeekEnd];
        var needToWork = StaticResource.IsNeedToWork[dayInfo.IsNeedToWork];
        var extraShiftInfo = "";
        var holidayInfo = "";

         if(dayInfo.ExtraShiftInfo && dayInfo.HolidayInfo){
            extraShiftInfo = dayInfo.ExtraShiftInfo.Name
            holidayInfo = dayInfo.HolidayInfo.Name;
        }

        var dayInfoDom = '<p>当日信息 : {weekendInfo}  {holidayInfo}  {extraShiftInfo} {needToWork}</p>';
        dayInfoDom = dayInfoDom.replace("{weekendInfo}", isWeekEnd)
                           .replace("{holidayInfo}", holidayInfo)
                           .replace("{extraShiftInfo}", extraShiftInfo)
                           .replace("{needToWork}", needToWork);

        $('#lblDayInfo').append(dayInfoDom);
    }



    function showApplicationTittle(targetUser, dayInfo) {
        var applyUserName = targetUser.Name;
        var nowDay = Date.fromEpoch(dayInfo.Date).toFullChineseDateFormat();
        var tittleStr = applyUserName + " " + nowDay + " " + "考勤情况";

        $('#lblTittle').html(tittleStr);
    }



    function showApplicationDetail(application, dayInfo, currentUser, evaluationModifyHistory) {
        showApplicationList(application);
        showDayInfo(dayInfo);
        showApplicationTittle(currentUser, dayInfo);
        showEvaluationModifyHistory(evaluationModifyHistory);
    }



    function isAttendanceDataCanged(currentData) {
        var isChanged = false;
        //判断是否有内容被修改 
        for (var key in g_Var["dataStorage"]) {

            if (currentData[key] != g_Var["dataStorage"][key]) {
                isChanged = true;
            }
        }

        return isChanged;
    }






    function initPage() {
        EzTipsManager.addTipBox('#tip_Remind', 'tipRemind');
        EzTipsManager.addTipBox('#tip_ModifyInfo', 'tipModifyInfo');

        EzTipsManager.showTipBox('tipRemind');
        EzTipsManager.showTipBox('tipModifyInfo');
        $(document).ajaxBusy();

        CreateAccessor();
        var application = EzAccessor.getModifyAttendanceApplication();
        var dayInfo = EzAccessor.getDayInfo();
        var targetUser = EzAccessor.getTargetUser();
        var attendanceDetail = EzAccessor.getDayAttendanceDetail();
        var evaluationModifyHistory = EzAccessor.geEvaluationModifyHistory();

        $('#selAbsent').comboxBinding(StaticResource.YesOrNoBing, 'text', 'value');
        $('#selExtraWork').comboxBinding(StaticResource.YesOrNoBing, 'text', 'value');
        g_Var["currentDate"] = EzAccessor.getCurrentDate();

        //将原始数据保存
        g_Var["time"] = dayInfo.Date;
        g_Var["targetUserId"] = targetUser.Id;

        //显示相关信息
        showApplicationDetail(application,
                              dayInfo,
                              targetUser,
                              evaluationModifyHistory);
        if(g_Var.time <= g_Var.currentDate){
                //绑定考勤状况
            bindAttendanceDetail(attendanceDetail);

            g_Var["dataStorage"] = getStoreData();
            //todo:
            //将参数改成数组
            domFunction("#cmbLeaveEarly");
            domFunction("#cmbManHours");
            domFunction("#cmbBeLate");
 
        }
        else{
            $('#tblNoFuture').show();
            $('#tblAttendanceInfo').hide(); 
        }

        
    }





    function initPageEvent() {
        $("#selExtraWork").change(controlModifyButton);
        $("#selAbsent").change(controlModifyButton);

        $('#btnCancel').click(function () {
            $('.text').clearFields();
            $('.alink').show();
            $('.cmbEdit').hide();
            //恢复原始数据
            recoverData();

            // 给formBox去掉边框
            $('#pnlModify').css({
                'border': 'none'
                });
            $('.pnlModifySubmit').hide();
        
        });

        $('#btnSubmit').click(function () {
            $('.text').clearFields();
            $('.alink').show();
            $('.cmbEdit').hide();

            var targetyUserId = g_Var["targetUserId"];
            var date = g_Var["time"];
            var lateMiniutes = $('#cmbBeLate a').html();
            var leaveEarlyMiniutes = $('#cmbLeaveEarly a').html();
            var manHours = ($('#cmbManHours a').html()) * 10;
            var isAbsense = $('#selAbsent').val();
            var isExtraWork = $('#selExtraWork').val();

            EzAccessor.doModifyAttendanceEvaluation(
                                                        targetyUserId,
                                                        date,
                                                        lateMiniutes,
                                                        leaveEarlyMiniutes,
                                                        isAbsense,
                                                        isExtraWork,
                                                        manHours
                                                    );
        });


        $('#preDay').click(function () {
            var currentDate = Date.fromEpoch(g_Var["time"]);

            var perDay = new Date(
                currentDate.getFullYear(),
                currentDate.getMonth(),
                currentDate.getDate() - 1,
                0,
                0,
                0
            ).toEpoch();

            window.location.href = "ModifyAttendanceInfoPerDay?time="
                           + perDay + "&userId=" + g_Var["targetUserId"];

        });

         $('#nextDay').click(function () {
            var currentDate = Date.fromEpoch(g_Var["time"]);

            var nextDay = new Date(
                currentDate.getFullYear(),
                currentDate.getMonth(),
                currentDate.getDate() + 1,
                0,
                0,
                0
            ).toEpoch();

            window.location.href = "ModifyAttendanceInfoPerDay?time="
                           + nextDay  + "&userId=" + g_Var["targetUserId"];
        });
    }




    $(function () {
        initPage();
        initPageEvent();
    });
</script>
<!-- InstanceEndEditable -->
<body>
    <div id="root">
        <div id="headw">
            <div id="head">
                <!-- InstanceBeginEditable name="pageHead" -->
                <p>
                    早上好，杨裕欣(软件工程部)
                </p>
                <div id="status-bar">
                    <span><a href="#">设置</a></span>&nbsp; 魏玛软件出品
                </div>
                <!-- InstanceEndEditable -->
            </div>
        </div>
        <div id="main">
            <div id="contentw">
                <div id="content-page">
                    <!-- InstanceBeginEditable name="pageContent" -->
                    <div id="page-head">
                        <span id="lblTittle" style="margin-left: 1em;"></span>
                        <div style="float: left;">
                            <a id="preDay">前一天</a>
                        </div>
                        <div style="float: right;">
                            <a id="nextDay">后一天</a>
                        </div>
                    </div>
                    <div id="page-body">
                        <div id="tblNoFuture" style="display: none;">
                            <!-- <%Html.RenderPartial("_noFutureDisplayInfo"); %>-->
                        </div>
                        <div id="tblAttendanceInfo">
                            <ul class="fieldslist">
                                <li>
                                    <div class="l">
                                        *上班：
                                    </div>
                                    <div id="actionTimeOnDuty" class="r">
                                    </div>
                                </li>
                                <li>
                                    <div class="l">
                                        *下班：
                                    </div>
                                    <div id="actionTimeOffDuty" class="r">
                                    </div>
                                </li>
                            </ul>
                            <ul class="fieldslist">
                                <li>
                                    <div class="l">
                                    </div>
                                    <div id="cmbLeaveInfo" class="r">
                                    </div>
                                </li>
                            </ul>
                            <div id="pnlModify" class="formBox">
                                <ul class="fieldslist">
                                    <li>考勤评估记录（点击修改）： <span class="pnlModifySubmit" style="display: none; float: right;
                                        margin-right: 40px;">
                                        <input id="btnSubmit" style="width: 80px;" type="button" value="确定" />
                                        或者 <a id="btnCancel">取消</a> </span></li>
                                    <li>
                                        <div class="l">
                                            迟到：
                                        </div>
                                        <div class="r">
                                            <div id="cmbBeLate">
                                                <div class="alink">
                                                    <a>40</a>分钟
                                                </div>
                                                <div class="cmbEdit" style="display: none;">
                                                    <input class="text" style="width: 50px;" />
                                                    分钟
                                                    <div style="display: inline; margin-left: 10px;">
                                                        <input class="btnSubmit" type="button" value="确定" />
                                                        <input class="btnCancel" type="button" value="取消" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <li>
                                        <div class="l">
                                            早退：
                                        </div>
                                        <div class="r">
                                            <div id="cmbLeaveEarly">
                                                <div class="alink">
                                                    <a>40</a>分钟
                                                </div>
                                                <div class="cmbEdit" style="display: none;">
                                                    <input class="text" style="width: 50px;" />
                                                    分钟
                                                    <div style="display: inline; margin-left: 10px;">
                                                        <input class="btnSubmit" type="button" value="确定" />
                                                        <input class="btnCancel" type="button" value="取消" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <li>
                                        <div class="l">
                                            旷工：</div>
                                        <div class="r">
                                            <select id="selAbsent" class="selector">
                                            </select></div>
                                    </li>
                                    <li>
                                        <div class="l">
                                            加班：</div>
                                        <div class="r">
                                            <select id="selExtraWork" class="selector">
                                            </select></div>
                                    </li>
                                    <li>
                                        <div class="l">
                                            工时：
                                        </div>
                                        <div class="r">
                                            <div id="cmbManHours">
                                                <div class="alink">
                                                    <a>8</a>小时
                                                </div>
                                                <div class="cmbEdit" style="display: none;">
                                                    <input class="text" style="width: 50px;" />
                                                    小时
                                                    <div style="display: inline; margin-left: 10px;">
                                                        <input class="btnSubmit" type="button" value="确定" />
                                                        <input class="btnCancel" type="button" value="取消" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!-- InstanceEndEditable -->
                </div>
                <div id="content-foot">
                    <small>这个是内容下面的脚注</small></div>
            </div>
            <div id="tipsw">
                <!-- InstanceBeginEditable name="pageShortcut" -->
                <!-- InstanceEndEditable -->
                <div id="tips" class="box">
                </div>
            </div>
            <div class="clearfloat">
            </div>
        </div>
    </div>
    <!-- InstanceBeginEditable name="pageFoot" -->
    <div id="tip_Remind" style="display: none;">
        <h1>
            小贴士:</h1>
        <p class="indent">
            你可以修改考勤评估记录。
        </p>
    </div>
    <div id="tip_ModifyInfo" style="display: none;">
        <h1>
            考勤评估修改历史：</h1>
        <div class="indent">
            <div id="cmbApplyInfo" style="background: #eefefe; border: 1px #999; color: gray;
                width: 100%; margin: 10px 0 10px 0; font-size: 12px;">
            </div>
            <div id="cmbEvaluationModifyHistory" style="background: #eee; border: 1px #999; color: gray;
                width: 100%; margin: 10px 0 10px 0; font-size: 12px;">
            </div>
        </div>
    </div>
    <!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd -->
</html>
